FROM php:5.4-apache
ADD sources.list /etc/apt/sources.list
# Install modules
RUN apt-get update && apt-get install -y \
        libfreetype6-dev \
        libjpeg62-turbo-dev \
        libmcrypt-dev \
        libpng12-dev \
    && docker-php-ext-install iconv mcrypt \
    && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
    && docker-php-ext-install gd mbstring \
    && rm -rf /var/lib/apt/lists/*
EXPOSE 80
RUN userdel www-data && useradd www-data
CMD ["apache2-foreground"]
